package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 殇
 * Date: 2025-07-14
 * Time: 15:58
 */
public class Person {

    public static void fun(int[] array,int index){
        if(array==null)
            throw new NullPointerException("这是一个空指针异常");
        if(index>array.length||index<0)
            throw new ArrayIndexOutOfBoundsException("这是越界异常");
        System.out.println("mwm");
    }

    public static void main(String[] args) throws CloneNotSupportedException{
        //fun(null,1);
        //fun(new int[3],-1);
    }
}
